function [DWL, DWL_pertax, DWL_perinc,DWL_tri, DWL_tri_pertax, DWL_tri_perinc]=find_DWL(config,g_level,g2_level,yy)

    %%%%%%%%%%%%%%%%%%%%%%%
    % INPUT
    %%%%%%%%%%%%%%%%%%%%%%%

p_interest_univ=config.p_interest_univ;
y_interest_univ=config.y_interest_univ;
y_interest=config.y_interest;
points=size(config.p_interest_univ,1);
y_interest_DWL=config.y_interest_univ(yy,1);

    %%%%%%%%%%%%%%%%%%%%%%%
    % INITIALIZE
    %%%%%%%%%%%%%%%%%%%%%%%

y_start=y_interest_DWL;
p_start=min(p_interest_univ);
p_final=max(p_interest_univ);

select=(y_interest==y_interest_univ(yy,1));
g_level_DWL=g_level(select);
g2_level_DWL=g2_level(select);
g22_level_DWL=NaN*g2_level_DWL;

    %%%%%%%%%%%%%%%%%%%%%%%
    % COMPUTE RESULTING DWL
    %%%%%%%%%%%%%%%%%%%%%%%

y_start_level=exp(y_interest_DWL);
p_start_level=exp(p_start);
p_final_level=exp(p_final);

[e_level, h_level, ~] = bound_demandcomp(y_start_level, p_start_level, p_final_level, points, g_level_DWL, g2_level_DWL, g22_level_DWL);

    %%%%%%%%%%%%%%%%%%%%%%%
    % OUTPUT
    %%%%%%%%%%%%%%%%%%%%%%%

CV = e_level(points,1) - (exp(y_start));
DWL= CV - (exp(p_final) - exp(p_start))* h_level(points,1);

tax   = (exp(p_final)-exp(p_start))* h_level(points,1);

DWL_pertax=DWL/tax;
DWL_perinc=DWL/exp(y_start);

DWL_tri = 0.5*(h_level(1,1)-h_level(points,1))* (exp(p_final)-exp(p_start));
DWL_tri_pertax=DWL_tri/tax;
DWL_tri_perinc=DWL_tri/exp(y_start);

    %
